package net.findkrypton.event;

import javafx.scene.input.MouseButton;
import net.findkrypton.enume.CenterButtonState;
import net.jumpengine.inter.IControl;
import net.jumpengine.inter.IMouseEvent;

public class RunningMouseEvent implements IMouseEvent {
	private RunningStateEvent event;
	private IControl control;
	
	public RunningMouseEvent(RunningStateEvent event) {
		this.event = event;
	}

	@Override
	public void click(int x, int y, MouseButton button) {
		
	}

	@Override
	public void mousePressed(int x, int y, MouseButton button) {
		if(!event.getArray().isLoser()) {
			event.getImageState().setState(CenterButtonState.down);
		}
	}

	@Override
	public void mouseReleased(int x, int y, MouseButton button) {
		if(!event.getArray().isLoser()) {
			event.getImageState().setState(CenterButtonState.nomal);
		}
	}

	@Override
	public void mouseMove(int x, int y, MouseButton button) {
		// TODO Auto-generated method stub

	}

	@Override
	public void setFocus(IControl control) {
		this.control=control;
	}

	@Override
	public IControl getFocus() {
		return control;
	}

}
